<template>
  <div id="error">
    <p class="desc" v-if="statusTxt && status">账号{{statusTxt}}</p>
    <p class="desc" v-else>啊哦，出错了</p>
    <!-- 审核不通过 -->
    <van-row v-if="status === 3">
      <van-col span="10" offset="7">
        <van-button size="normal" block @click="handleClick">重新提交</van-button>
      </van-col>
    </van-row>
  </div>
</template>
<script>
import {USER_STATUS} from '@/utils/constant'
export default {
  data () {
    return {
      status: +this.$route.query.status,
      type: +this.$route.query.type
    }
  },
  computed: {
    statusTxt () {
      let st = USER_STATUS.filter(item => item.id === this.status)
      if (st.length) {
        return st[0].label
      }
      return null
    }
  },
  methods: {
    handleClick () {
      this.$router.push(`/register?type=${this.type}`)
    }
  }
}
</script>
<style lang="less" scoped>
#error {
  padding-top: 155px;
  .desc {
    background: url('');
    background-size: 80px 80px;
    background-position: center center;
    background-repeat: no-repeat;
    padding-top: 120px;
    font-size: 14px;
    color: #999;
    text-align: center;
    line-height: 30px;
  }
}
</style>

